﻿namespace Microsoft.SharePoint.Client
{
    using System;
    using System.ComponentModel;

    [ScriptType("SP.Feature", ServerTypeId="{4e46b28c-e27f-4964-a8d4-fc25658d86d1}")]
    public class Feature : ClientObject
    {
        [EditorBrowsable(EditorBrowsableState.Never)]
        public Feature(ClientRuntimeContext Context, ObjectPath ObjectPath) : base(Context, ObjectPath)
        {
        }

        protected override bool InitOnePropertyFromJson(string peekedName, JsonReader reader)
        {
            string str;
            bool flag = base.InitOnePropertyFromJson(peekedName, reader);
            if (!flag && (((str = peekedName) != null) && (str == "DefinitionId")))
            {
                flag = true;
                reader.ReadName();
                base.ObjectData.Properties["DefinitionId"] = reader.ReadGuid();
            }
            return flag;
        }

        [Remote]
        public Guid DefinitionId
        {
            get
            {
                base.CheckUninitializedProperty("DefinitionId");
                return (Guid) base.ObjectData.Properties["DefinitionId"];
            }
        }
    }
}

